<script>
    function getResult() {
        l = arguments.length
        if (l == 0)
            return false
        ll = l
        while (ll-- != 0) {
            if (typeof (arguments[ll]) != "number" && typeof (arguments[ll]) != "bigint")
                return false
        }
        object = {
            sum: 0,
            max: 0,
            min: 0,
            avgrates: 0
        }
        ll = l
        while (ll-- != 0) {
            object.sum += arguments[ll]
        }
        ll = l
        while (ll-- != 0) {
            if (ll == l - 1) {
                object.max = arguments[ll]
                if (ll - 1 == 0)
                    break
            }
            else {
                if (object.max < arguments[ll])
                    object.max = arguments[ll]
            }
        }
        ll = l
        while (ll-- != 0) {
            if (ll == l - 1) {
                object.min = arguments[ll]
                if (ll - 1 == 0)
                    break
            }
            else {
                if (object.min > arguments[ll])
                    object.min = arguments[ll]
            }
        }
        object.avgrates = object.sum / l
        return object
    }
    object = getResult(1, 2, 3, 4)
    for (var a in object) {
        alert(object[a])
    }
</script>